package www.battlecall.tk.basedemo.service;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by BattleCall on 2018/8/2.
 */

public class Person implements Parcelable{
	private String name;

	public Person(String name){
		this.name = name;
	}

	protected Person(Parcel in){
		name = in.readString();
	}

	public static final Creator<Person> CREATOR = new Creator<Person>() {
		@Override
		public Person createFromParcel(Parcel source) {
			return new Person(source);
		}

		@Override
		public Person[] newArray(int size) {
			return new Person[size];
		}
	};

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(name);
	}

	@Override
	public String toString() {
		return "Person{" +
				"name='" + name + '\'' +
				'}';
	}
}
